package com.itheima.health.dao;

import com.itheima.health.pojo.OrderSetting;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Mapper
public interface OrderSettingDao {
    void insert(OrderSetting orderSetting);
    long findCountByOrderDate(Date orderDate);
    void editNumberByOrderDate(OrderSetting orderSetting);

    List<OrderSetting> getOrderSettingByMonth(Map date);

    @Select("select * from t_ordersetting where orderDate = #{orderDate}")
    OrderSetting selectByDate(Date orderDate);

    void updateReservationsById(@Param("id") Integer id, @Param("reservations") int reservations);
}
